import webapp2
from webapp2 import uri_for, Route
from webapp2_extras.routes import RedirectRoute
from google.appengine.ext.webapp.util import run_wsgi_app

import logging



routes = [
          RedirectRoute('/live', handler='skydrive.LiveHandler', name="live", strict_slash=True),
          Route('/live/<mode>', handler='skydrive.LiveHandler'),
          RedirectRoute('/skydrive', handler='skydrive.SkyDriveHandler',  name="skydrive", strict_slash=True),
          RedirectRoute('/skydrive/<folder>', handler='skydrive.SkyDriveFolderHandler', name="folder", strict_slash=True),
          RedirectRoute('/skydrive/file/<file>', handler='skydrive.SkyDriveFileHandler',  name="file", strict_slash=True),
          ]

application = webapp2.WSGIApplication(routes, debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()